//#include <stdio.h>
//#include <stdlib.h>

#include <iostream>


using namespace std;



class  Linked
{
	public:
		string cycle ;
		string head;
		



};






 
class Link :public Linked
{
	public:
		
		Link();	
		~Link();
			
		
		string name ;
		int age ;
		
		void show();

		void Show_Link(int lenth)
		{
			cout<<"link的长度为："<<lenth<<endl;



		}

		void Show_Link(double lenth)
		{
			cout<<"link的长度为："<<lenth<<endl;
			

		}

//		{
//			cout<< "Link的属性："<< name<<endl<<"Link的长度:"<< age <<endl;
//			 
//		
//		} 


};

	
int main ()
{
	Link LINK0;
	LINK0.show();
	LINK0.Show_Link(100);
	LINK0.Show_Link(10.567);
	
	
    //exit (0);
    return 0;
    
}

void Link::show()	//this 指针，用来指向成员函数的指针，由函数本身创建，只能在成员函数中使用，在其他位置不允许使用。 
{
	this->name = "DoubleLink";
	this->age = 15;
	
	this->cycle="Yes";
	this->head = "Have";
	cout<<"Link的头结点："<<this->head<<endl<<"Link的循环 ："<< this->cycle<<endl<<"Link的"<<"Link的name:"<<this->name<<endl<<"Link的age："<<this->age<<endl;

}


Link::Link()

{
	cout<<"构造函数"<<endl;
	 

}


Link::~Link()
{
	cout<<"析构函数"<<endl; 

} 
